<template>
  <div>依赖注入的子组件 - {{ count }}</div>
</template>

<!-- <script setup>
import { inject } from "vue";

const count = inject("count", "默认值");
</script> -->

<script>
import { inject } from "vue";
export default {
  setup() {
    const count = inject("count", "默认值");

    return {
      count,
    };
  },
};
</script>
